<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div class="addPower"><label>添加权限</label></div>
<div>
	<s:form id="add_power_form" namespace="/control/mapping" action="power_addPower.go">
		<table>
			<tr>
				<td>权限名称:</td>
				<td class="powerInput"><input class="inputText" type="text" id="_powerName"  name="power.name"/></td>
				<td class="borderClass" id="nameMassage">权限名称长度为2-20，不能包含空字符</td>
			</tr>
			<tr>
				<td>权限所属父类</td>
				<td class="powerInput">
				<s:hidden  id="power_parent_id" name="power.parent"></s:hidden>
				<input  type="text" id="power_parent_name" readonly="readonly" style="background-color:#E1E1E1; " />
				<input type="button" value="选择父类" onclick="selectPowerParent()"/></td>
				<td class="borderClass" id="parentMassage">必须选择一个父类</td>
			</tr>
			<tr>
				<td>权限URL:</td>
				<td class="powerInput"><input class="inputText" id="_powerUrl" type="text" name="power.url"/></td>
				<td class="borderClass" id="URLMessage">如果是父类该URL可以不填写，否则必须填写URL</td>
			</tr>
			<tr>
				<td>权限状态:</td>
				<td class="powerInput">
					<select class="inputText" name="power.state">
						<option value="1">活动</option>
						<option value="0">锁定</option>
					</select>
				</td>
				<td class="message"></td>
			</tr>
			<tr>
				<td>备注：</td>
				<td colspan="2"  class="powerInput">
					<textarea class="inputText" rows="5" cols="20" name="power.remarks"></textarea>
				</td>
			</tr>
			<tr  style="width: 20%">
				<td colspan="3">
					<input type="button" value="" onclick="addPower()"style="background: url(/image/admin/tj.jpg)no-repeat;width: 85px;height: 28px;border: 0px;"/>
					<input type="reset"  value="" style="background: url(/image/admin/del.jpg)no-repeat;width: 85px;height: 28px;border: 0px;"/>
				</td>
			</tr>
		</table>
	</s:form>
</div>
</body>
</html>